package com.mdd.admin.service.order;

import com.github.binarywang.wxpay.bean.notify.SignatureHeader;
import com.github.binarywang.wxpay.exception.WxPayException;
import com.mdd.admin.validate.common.PageParam;
import com.mdd.admin.validate.order.OrderRefundParam;
import com.mdd.admin.vo.order.OrderRefundListVo;
import com.mdd.admin.vo.order.OrderRefundDetailVo;
import com.mdd.admin.vo.order.OrderRefundLogListVo;
import com.mdd.common.core.PageResult;

import java.util.List;
import java.util.Map;

/**
 * 订单退款服务接口类
 * @author panweiliang
 */
public interface IOrderRefundService {

    /**
     * 订单退款列表
     *
     * @author panweiliang
     * @param pageParam 分页参数
     * @param params 搜索参数
     * @return PageResult<OrderRefundVo>
     */
    PageResult<OrderRefundListVo> list(PageParam pageParam, Map<String, String> params);

    /**
     * 订单退款日志列表
     *
     * @author panweiliang
     * @param refundId 订单id
     * @return List<OrderRefundListVo>
     */
    List<OrderRefundLogListVo> listLog(Integer refundId);

    /**
     * 退款单指标统计数据
     * @return
     */
    Map<String, Object> statistics();

    /**
     * 订单退款新增
     *
     * @author panweiliang
     * @param orderRefundParam 参数
     */
    void add(OrderRefundParam orderRefundParam) throws WxPayException;

    /**
     * 重新退款
     *
     * @author panweiliang
     * @param orderRefundParam 参数
     */
    void addAgain(OrderRefundParam orderRefundParam) throws WxPayException;

    /**
     * 订单退款删除
     *
     * @author panweiliang
     * @param id 主键ID
     */
    void del(Integer id);

    Map<String, Object> getOrderStatistic();


    /**
     * 检查退款状态
     */
    void checkStatus();

    void parseRefundNotify(String jsonData, SignatureHeader signatureHeader) throws WxPayException;

}
